Skip to content

查询订单

可通过“商户订单号”和“微信订单号”两种方式查单。

🚫

本接口服务已于 2019.12.16 (北京时间)下线,文档仅做留存参考。

请求参数类型描述
transaction_idstring微信支付订单号
queryobject声明请求的查询参数
sub_mchidstring特约商户号
php
$instance->v3->ebike->charge->transactions->id->_transaction_id_->getAsync([
  'transaction_id' => '25012014070332333018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ebike/charge/transactions/id/{transaction_id}')->getAsync([
  'transaction_id' => '25012014070332333018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ebike/charge/transactions/id/{transaction_id}']->getAsync([
  'transaction_id' => '25012014070332333018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ebike->charge->transactions->id->_transaction_id_->get([
  'transaction_id' => '25012014070332333018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ebike/charge/transactions/id/{transaction_id}')->get([
  'transaction_id' => '25012014070332333018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ebike/charge/transactions/id/{transaction_id}']->get([
  'transaction_id' => '25012014070332333018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mchidstring商户号
sub_mchidstring特约商户号
appidstring服务商公众号ID
sub_appidstring特约商户公众号ID
out_trade_nostring商户订单号
transaction_idstring微信订单号
attachstring商户数据
trade_typestring交易类型
bank_typestring银行类型
success_timestring成功时间
trade_statestring交易状态
trade_state_desstring交易状态描述
contract_idstring充电授权扣费协议号
payerobject支付者信息
openidstring用户在服务商的标识
sub_openidstring用户在特约商户的标识
amountobject订单金额信息
totalinteger订单金额
currencystring货币类型
payer_totalinteger用户实际支付金额
discount_totalinteger折扣
device_infoobject设备信息
device_idstring充电位设备号
device_ipstring商户端设备ip
promotion_detailobject[]优惠信息
promotion_idstring券ID
namestring优惠名称
scopestring优惠范围
typestring优惠类型
activity_idstring活动ID
amountinteger优惠券面额
wxpay_contributeinteger微信出资
merchant_contributeinteger商户出资
other_contributeinteger其他出资

参阅 官方文档

Published on the GitHub by TheNorthMemory